<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
</head>
<body>
<div style="padding-bottom:200px" class="layui-form layuimini-form">

    <input type="hidden" name="id" value="{$res.id}" />
    <input type="hidden" name="bizpro_id" value="{$res.bizpro_id}" />
    <input type="hidden" name="advert_type" value="{$cate}" />
    <div class="layui-form-item">
        <label class="layui-form-label required">名称</label>
        <div class="layui-input-block">
            <input type="text"  value="{$res.title}" name="title" lay-verify="required" lay-reqtext="名称不能为空" placeholder="请输入名称"  class="layui-input">
        </div>
    </div>
    <!--展示类型只有我的页广告有-->
    {if condition="$cate > 1"}
    <div class="layui-form-item">
        <label class="layui-form-label required">类型</label>
        <div class="layui-input-block">
            <select name="show_type" lay-filter="show_type">
                <option {if condition="$res.show_type==1"} selected {/if} value="1">弹窗</option>
                <option {if condition="$res.show_type==2"} selected {/if} value="2">跳转</option>
                <option {if condition="$res.show_type==3"} selected {/if} value="3">详情</option>
            </select>
        </div>
    </div>
    {/if}

    <!--我的页广告选项 开始-->
    {if condition="$cate > 1"}
    <!--上架时间-->
    <div class="layui-form-item">
        <label class="layui-form-label required">上下架时间</label>
        <div class="layui-input-block">
            <input type="text" id="start_time" {if condition="$res.start_time"}  value="{$res.start_time} - {$res.end_time}" {else} value="" {/if}  name="start_time" lay-verify="required" lay-reqtext="上架时间不能为空"    class="layui-input">
        </div>
    </div>
    <!--展示详情-->
    <div class="layui-form-item layui-form-text"  {if condition="$res.show_type !=3"}  style="display: none"  {/if}>
        <label class="layui-form-label">展示详情</label>
        <div class="layui-input-block">


            <div class="layui-textarea" id='LAY_demo_editor' ></div>

            <input type="hidden" id="editorimgurlHidden"  name="editor_imgs" value="{$res.editor_imgs}" >
            <!--<input    type="hidden" id="content1" value="{$res.detail}" >-->
        </div>
    </div>
    <div id="hideDetail" style="display: none">
        {$res.content}
    </div>
    <!--跳转地址-->
    <div class="layui-form-item" {if condition="$res.show_type !=2"}  style="display: none"  {/if}>
        <label class="layui-form-label required">跳转地址</label>
        <div class="layui-input-block">
            <input type="text" id="jump_address"   value="{$res.jump_address}"   name="jump_address"       class="layui-input">
        </div>
    </div>

    <!--弹窗图片-->
    {if condition="!$res.id"}
    <div class="layui-form-item" >
    <label class="layui-form-label">弹窗图片</label>
    <input type="hidden" id="imgurlHidden1" name="pop_imgurl">
    <div class="layui-input-inline uploadHeadImage">
        <div class="layui-upload-drag" id="headImg1">
            <i class="layui-icon"></i>
            <p>点击上传图片，或将图片拖拽到此处</p>
        </div>
    </div>
    <div class="" style="display: flex">
        <div class="layui-upload-list" style="margin-top: 5px;">
            <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl1">
            <p id="demoText1"></p>
        </div>
        <div class="layui-form-mid layui-word-aux">
            <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
        </div>
    </div>
    </div>
    {/if}

    {if condition="$res.show_type ==1"}
    {if condition="$res.pop_imgurl"}
    <div class="layui-form-item" {if condition="$res.show_type !=1"}  style="display: none"  {/if}>
        <label class="layui-form-label">弹窗图片</label>
        <input type="hidden" id="imgurlHidden1" name="pop_imgurl" value="{$res.pop_imgurl}">
        <div class="layui-input-inline uploadHeadImage">
            <div class="layui-upload-drag" id="headImg1">
                <i class="layui-icon"></i>
                <p>点击上传图片，或将图片拖拽到此处</p>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-upload-list" style="margin-top: 5px;">
                <img class="layui-upload-img headImage" style="height: 100px;" src="{$res.pop_imgurl}" id="imgurl1">
                <p id="demoText1"></p>
            </div>
        </div>
    </div>
    {else}
    <div class="layui-form-item" {if condition="$res.show_type !=1"}  style="display: none"  {/if}>
        <label class="layui-form-label">弹窗图片</label>
        <input type="hidden" id="imgurlHidden1" name="pop_imgurl">
        <div class="layui-input-inline uploadHeadImage">
            <div class="layui-upload-drag" id="headImg1">
                <i class="layui-icon"></i>
                <p>点击上传图片，或将图片拖拽到此处</p>
            </div>
        </div>
        <div class="" style="display: flex">
            <div class="layui-upload-list" style="margin-top: 5px;">
                <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl1">
                <p id="demoText1"></p>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
            </div>
        </div>
    </div>
    {/if}
    {/if}
    {/if}
 <!--我的页广告选项 结束-->


    {if condition="$res.id"}
    <div class="layui-form-item">
        <label class="layui-form-label">缩略图</label>
        <input type="hidden" id="imgurlHidden" name="imgurl" value="{$res.imgurl}">
        <div class="layui-input-inline uploadHeadImage">
            <div class="layui-upload-drag" id="headImg">
                <i class="layui-icon"></i>
                <p>点击上传图片，或将图片拖拽到此处</p>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-upload-list" style="margin-top: 5px;">
                <img class="layui-upload-img headImage" style="height: 100px;" src="{$res.imgurl}" id="imgurl">
                <p id="demoText"></p>
            </div>
        </div>
    </div>
    {else}
    <div class="layui-form-item">
        <label class="layui-form-label">缩略图</label>
        <input type="hidden" id="imgurlHidden" name="imgurl">
        <div class="layui-input-inline uploadHeadImage">
            <div class="layui-upload-drag" id="headImg">
                <i class="layui-icon"></i>
                <p>点击上传图片，或将图片拖拽到此处</p>
            </div>
        </div>
        <div class="" style="display: flex">
            <div class="layui-upload-list" style="margin-top: 5px;">
                <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl">
                <p id="demoText"></p>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
            </div>
        </div>
    </div>
    {/if}

  <!--首页广告选项 开始-->
{if condition="$res.advert_type == 1"}
    {if condition="$res.advert_type == 1"}
    <div class="layui-form-item">
        <label class="layui-form-label">关联商品</label>
        <div class="layui-input-block" style="width:100px">
            <input type="checkbox" lay-filter="switchTest" name="bizpro_type" value="{$res.bizpro_type}" {if condition="$res.bizpro_type==1"} value="1" checked  {/if} lay-skin="switch" lay-text="开|关">
        </div>
    </div>
    <div id="bizpro_type" {if condition="$res.bizpro_type==2"} style="display: none" {/if}>
    <div class="layui-form-item additem" {if condition="$res.bizpro_id!=0"}  style="display:none;"{/if}>
        <label class="layui-form-label required">添加商品</label>
        <div class="layui-input-block">
            <button type="button"  onclick="additem()" class="layui-btn" >添加</button>
        </div>
    </div>
    <table class="layui-table"   style="width:80%;margin-left: 150px;">
        <colgroup>
            <col width="150">
            <col width="200">
            <col width="200">
            <col width="150">
        </colgroup>
        <thead>
        <tr>
            <th>名称</th>
            <th>售价</th>
            <th>商品编号</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>

        <tr>
            <td>{$res.bizpro_name}</td>
            <td>{$res.bizpro_status_price}</td>
            <td>{$res.bizpro_status_number}</td>
            <td><button type="button"  lay-event="additem"  class="layui-btn additem">修改</button></td>
        </tr>
        </tbody>
    </table>
    </div>
   {/if}
{/if}
<!--我的页广告选项 结束-->



<div class="layui-form-item">
    <div class="layui-input-block">
        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
    </div>
</div>
<!--</form>-->
</div>
{include file="public/footer" /}
<script src="/static/admin/adverbanner/saveinfo.js?v={$Think.const.TIMESTAMP}" charset="utf-8"></script>

</body>
</html>